package cn.tedu.oop;

/**
 * @author SWJ
 * @create 2021-06-08 9:40
 */
public class DAY07 {
    public static void main(String[] args) {
        phone p=new phone();
        p.setBrand("ok");
        p.setColor("black");
        p.setSize(10);
        p.setPrice(5);
        System.out.println(p.getBrand());
        System.out.println(p.getPrice());
        System.out.println(p.getSize());
        System.out.println(p.getColor());

    }
}

class phone {
//完成属性并且封装
private String brand;
private double price;
private double size;
private String color;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getSize() {
        return size;
    }

    public void setSize(double size) {
        this.size = size;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
}